<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/style/Leftnavigationbar.css">
</head>
<body>
<div class="left">
    <div>
        <ul>
            <li class="activeClick product" onclick="location.href='/admin/product.jsp'">
                <i class="iconfont icon-shangpin-copy-copy"></i>
                商品管理
            </li>
            <li class="category" onclick="location.href='/admin/category.jsp'">
                <i class="iconfont icon-fenlei-copy"></i>
                分类管理
            </li>
            <li class="employee" onclick="location.href='/admin/employee.jsp'">
                <i class="iconfont icon-icon-yuangong-copy"></i>
                员工管理
            </li>
            <li class="member" onclick="location.href='/admin/member.jsp'">
                <i class="iconfont icon-huiyuan"></i>
                会员管理
            </li>
        </ul>
    </div>
</div>
</div>
<script src="../js/Leftnavigationbar.js"></script>
<script>
    document.querySelector('.activeClick').classList.remove('activeClick')

    const lis = document.querySelectorAll('li')
    for (const li of lis) {
        if (location.pathname.includes(...li.classList)) li.classList.add('activeClick')
    }
</script>
</body>
</html>
